<?php

namespace App\Service\H5;

use App\Model\UserCoin;
use App\Model\UserProfile;
use App\Service\BaseService;

/**
 * 获取用户信息
 */
class GetUserInfoService extends BaseService
{
    public function handle()
    {
        $userId = $this->getUserId();
        $profileId = $this->request->input('profile_id', 1);
        //个人资料
        $profile = UserProfile::getInfoByProfileId($profileId);
        $userCoin = UserCoin::getUserInfo($userId);
        return [
            'avatar' => $profile->avatar,
            'nick_name' => $profile->nick_name,
            'profile_id' => $profile->user_profile_id,
            
        ];
    }
}
